# -*- coding: utf-8 -*-
"""
author: WenzhouZhang
date: 2020/8/23
"""
import time
import threading
from rpc.AsynCallback import AsyncCallback


@AsyncCallback
def test_thread(event):
    print 'starting processing ' + str(time.time())
    event.wait()
    print 'haha ' + str(time.time())


if __name__ == '__main__':
    event = threading.Event()
    test_thread(event)
    time.sleep(3)
    event.set()
    time.sleep(3)
    print 'main finish'


